﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FrameWork.Source.Animation_Classes;
using FrameWork.Source.Texture;
using FrameWork.Source.Resource_Manager;

namespace Boomer.Source.Effect
{
    class CDyingEffect : CEffect
    {

        public CDyingEffect()
            : base()
        {

        }

        public override void init()
        {
            CAnimation pAnim;
            pAnim = new CAnimation();

            pAnim = new CAnimation();
            pAnim.createAnimation(0, 0, 7, 7, 1.0f / 10.0f);

            CTexture image = CResourceManager.getInstance().getImage((int)CResourceManager.IMG_MAIN.DYINGEFF);

            loadSprite(image, 8, 8, 72, 72, pAnim);

            this.m_fDeep = 1.0f;
            base.init();
        }

        public override void update(float deltaTime)
        {
            if (this.getCurrAnimation().isEndAnimation())
            {
                this.m_isAlive = false;
            }
            base.update(deltaTime);
        }

        public override void draw()
        {
            base.draw();
        }
    }
}
